<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	
	<xsl:param name="login-error" />
	
	<xsl:template name="login-place">
		<form name="login" action="/user/login/check" enctype="multipart/form-data" method="POST">
			<xsl:choose>
				<xsl:when test="//page/logined">
					<xsl:if test="//page/logined/@status=2">
						<a class="text" href="/article/editor">Добавить статью </a>
					</xsl:if>
					Здравствуйте, <xsl:value-of select="//page/logined/@family" /> <![CDATA[&nbsp;]]>
					<xsl:value-of select="//page/logined/@name" /> <![CDATA[&nbsp;]]>
					<xsl:value-of select="//page/logined/@fname" /> <![CDATA[&nbsp;&nbsp;]]>
					<a class="text" href="/user/logout">Выход</a>
				</xsl:when>
				
				<xsl:otherwise>
					<xsl:if test="$login-error">
						<xsl:value-of select="$login-error" />
					</xsl:if>
					Логин: <input type="text" name="login" class="login-input" /> <![CDATA[&nbsp;]]>
					Пароль: <input type="password" name="password" class="login-input" /> <![CDATA[&nbsp;]]>
					<input type="submit" value="Вход" /> <![CDATA[&nbsp;&nbsp;]]>
					<a href="/user/register" class="text">Регистрация</a>
				</xsl:otherwise>
				
			</xsl:choose>
		</form>
	</xsl:template>
</xsl:stylesheet>